I want to add a skip list to this DXL, but i don't get it and I can't figure it out...I'm attaching the code that YOU use to update and create the objects. All I want to do is put a skip list in where if New/updated objects UC_ID_QUID = the HEADING UC_ID_QUID of the object heading move it under it...got any ideas?
|
Re: Skip list create - Anyone help me
Huh? Do I understand correctly?
Skip skpQUID = createString() // KEY: 'string' UC_ID_QUID; DATA: last 'Object' with that value
for oReq in entire mReq do
{ if (!isDeleted(oReq))
{ QUID = oReq."QUID"
if (find(skpQUID, QUID))
{ delete(skpQUID, QUID)) // Remove the previous "last" object with that value
}
put(skpQUID, QUID, oReq) // This is the "last" one found with QUID, so far
}
}
find(skpQUID, QUID, oReq)
Skip skpSubReqID = createString() // key 'string' ReqID; DATA: 'Object' with that reqID
for oReq in mReq do
{ if (isDeleted(oReq)) continue
ReqID = oReq."QUID"
if (!null Req) put(skpSubReqID, ReqID, oReq)
}
// Later:
for o in m
{ if (find(skpReqID, ReqID, oReq))
then found a match
else need new Requirement
}
|
Re: Skip list create - Anyone help me |
Re: Skip list create - Anyone help me I need some more help with this code. The help that I need is still with the placement of the objects when they are created. I want the new objects to be created under the first instance of the heading where the Use Case ID matches with the new Use Case ID. Any thoughts? Again, it's been a while since I've had to modify DXL code. Attachments update_subsystem_requirements_2.dxl |
Re: Skip list create - Anyone help me bellincm - Fri Jun 14 14:43:03 EDT 2013 I need some more help with this code. The help that I need is still with the placement of the objects when they are created. I want the new objects to be created under the first instance of the heading where the Use Case ID matches with the new Use Case ID. Any thoughts? Again, it's been a while since I've had to modify DXL code. You can create an object to be the first (top) object in the module. Otherwise you can only create an object relative to some other object; either
so you need to keep a Handle on where you want the new object. That obviously is the object that is the "heading where the Use Case ID matches". That important information my qualify as a global variable. I'm pretty sure you want to create new objects always "last below" that object. "move" after "create" doesn't help, since "move" likewise requires you to know exactly where you want it so you might as well just create it where you want it rather than adding a level of confusion. -Louie |